package com.pojo;

import com.jdk8.LambdaInterface;

import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;

public class Student implements LambdaInterface {
    static {
        System.out.println("我是静态块");
    }
   // Student::new
    public Student() {
    }

    // Student::new
    public Student(int sid, String sname) {
        this.sid = sid;
        this.sname = sname;
    }

    private int sid;
    private String sname;

    // stu::getSid
    public int getSid() {
        return sid;
    }

    // stu::setSid
    public void setSid(int sid) {
        this.sid = sid;
    }

    // stu::getSname
    public String getSname() {
        return sname;
    }

    // stu::setSname
    public void setSname(String sname) {
        this.sname = sname;
    }

    // stu::toString
    @Override
    public String toString() {
        return sid + "\t" + sname;
    }


    // stu::add
    @Override
    public int add(int x, int y) {
        return x + y;
    }

    // Student::add2
    public static int add2(int x, int y) {
        return x + y;
    }


    //静态方法  Student::comp
    public static  int comp(Student s1, Student s2)
    {
        return s1.getSid()-s2.getSid();
    }


}
